#pragma once

#include <vex/iterable/concept/one_pass_range_concept.h>

namespace vex { namespace iterable { namespace concept {

    template <class T>
    class ForwardRange : public OnePassRange<T> {
    public:
        typedef range_traits<T> traits;
        typedef typename traits::category category;
        typedef typename traits::range_type range_type;
        typedef typename traits::value_type value_type;
        typedef typename traits::reference reference;
        typedef typename traits::pointer pointer;
    public:
        BOOST_CONCEPT_ASSERT((boost::Convertible<category, forward_range_tag>));
        BOOST_CONCEPT_USAGE(ForwardRange)
        {
            T t_saved = m_instance.save();
            this->same_type(t_saved, m_instance);
        }
    private:
        T m_instance;
    };
}}}